#include ../make.inc
include ../custom.inc

LIB = ../src/libmatrix.a
INC = -I../src

EXE = btlu

all: main

main: src
	$(CXX) $(CXXFLAGS) btlu.cpp -o $(EXE) $(INC) $(LIB) $(BLAS) -lgfortran

debug:
	./$(EXE) $(MXPATH)/CFD/ex11/ex11.rb
	
bench: main CSP CFD SP SDP TP TQC

CSP:
	./$(EXE) $(MXPATH)/CSP/circuit_3/circuit_3.rb
	./$(EXE) $(MXPATH)/CSP/circuit_4/circuit_4.rb
	./$(EXE) $(MXPATH)/CSP/hcircuit/hcircuit.rb
	./$(EXE) $(MXPATH)/CSP/coupled/coupled.rb
	./$(EXE) $(MXPATH)/CSP/ASIC_680k/ASIC_680k.rb
CFD:
	./$(EXE) $(MXPATH)/CFD/poisson3Da/poisson3Da.rb
	./$(EXE) $(MXPATH)/CFD/ex11/ex11.rb
	./$(EXE) $(MXPATH)/CFD/ns3Da/ns3Da.rb
	./$(EXE) $(MXPATH)/CFD/mixtank_new/mixtank_new.rb
	./$(EXE) $(MXPATH)/CFD/bbmat/bbmat.rb
	./$(EXE) $(MXPATH)/CFD/Goodwin_071/Goodwin_071.rb
	./$(EXE) $(MXPATH)/CFD/water_tank/water_tank.rb
	./$(EXE) $(MXPATH)/CFD/venkat01/venkat01.rb
	./$(EXE) $(MXPATH)/CFD/poisson3Db/poisson3Db.rb
	./$(EXE) $(MXPATH)/CFD/PR02R/PR02R.rb
SP:
	./$(EXE) $(MXPATH)/SP/bcsstk35/bcsstk35.rb
	./$(EXE) $(MXPATH)/SP/nasasrb/nasasrb.rb
	./$(EXE) $(MXPATH)/SP/apache1/apache1.rb
SDP:
	./$(EXE) $(MXPATH)/SDP/nmos3/nmos3.rb
	./$(EXE) $(MXPATH)/SDP/wang3/wang3.rb
TP:
	./$(EXE) $(MXPATH)/TP/FEM_3D_thermal2/FEM_3D_thermal2.rb
TQC:
	./$(EXE) $(MXPATH)/TQC/Si10H16/Si10H16.rb
	./$(EXE) $(MXPATH)/TQC/Si5H12/Si5H12.rb
	./$(EXE) $(MXPATH)/TQC/SiO/SiO.rb
	./$(EXE) $(MXPATH)/TQC/H2O/H2O.rb

src:
	cd ../src && make

clean:
	rm $(EXE) 
	cd ../src; make clean

remake:
	make clean
	make all
